package dd.prog2.exercises.set04;

public class VectorMathFactory {

	/*ein V instanzieren anhand von Parameter*/
	public static Vector createVector(int size, boolean vOptimize) {
		Vector v;
		if (size == 2 && vOptimize == true) {
			v = new Vector2();
		} else
			v = new DefaultVector(size);

		return v;

	}
	/*eine M instanzieren anhand von Parameter*/
	public static Matrix createMatrix(int i, int j, boolean mOptimize) {
		Matrix m;
		if (mOptimize) {
			m = new EfficientMatrix(i, j);
		} else
			m = new DefaultMatrix(i, j);

		return m;
	}
}
